<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Web 测试管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/style.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
</head>

<body style="margin-top:40px;">

<div id="content">
	<div id="message"><s:actionmessage theme="mytheme"/></div>
	<form id="mainForm" action="stest.action" method="post">
		<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
		<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
		<input type="hidden" name="page.order" id="order" value="${page.order}"/>

		<div id="filter">
			<h1>测试页面列表</h1>&nbsp;&nbsp;<br>
			性别: <input type="text" name="filter_EQI_sex" value="${param['filter_EQS_sex']}" size="9"/>
			姓名: <input type="text" name="filter_LIKES_name"
							 value="${param['filter_LIKES_name']}" size="9"/>
			<input class="button" type="button" value="搜索" onclick="search();"/>
		</div>
		<div>
			<table id="contentTable" width="95%" border="0" cellpadding="5" cellspacing="0">
				<tr>
					
					<th bgcolor="#F5F5F5"><a href="javascript:sort('name','asc')">姓名</a></th>
					<th bgcolor="#F5F5F5"><a href="javascript:sort('sex','asc')">性别</a></th>
					
					<th bgcolor="#F5F5F5">操作</th>
				</tr>

				<s:iterator value="page.result">
					<tr>
						
						<td>${name}&nbsp;</td>
						<td>${sex}&nbsp;</td>
						
						<td>&nbsp;
							<security:authorize ifAnyGranted="A_VIEW_USER">
								<security:authorize ifNotGranted="A_MODIFY_USER">
									<a href="stest!input.action?id=${id}">查看</a>&nbsp;
								</security:authorize>
							</security:authorize>

							<security:authorize ifAnyGranted="A_MODIFY_USER">
								<a href="stest!input.action?id=${id}">修改</a>&nbsp;
								<a href="stest!delete.action?id=${id}">删除</a>
							</security:authorize>
						</td>
					</tr>
				</s:iterator>
			</table>
		</div>

		<div>
			第${page.pageNo}页, 共${page.totalPages}页
			<a href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
			<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>

			<security:authorize ifAnyGranted="A_MODIFY_USER">
				<a href="stest!input.action">增加新测试</a>
			</security:authorize>
		</div>
	</form>
</div>

</body>
</html>
